package model

// 批量查询的影像名称对象
type granuleName struct {
	// 影像名称
	Name string `json:"Name"`
}

// QueryRequest 用于批量查询Identifier的请求体
type QueryRequest struct {
	FilterProducts []granuleName `json:"FilterProducts"`
}

// NewQueryRequest 创建一个批量查询请求体
func NewQueryRequest(identifierList []string) *QueryRequest {
	request := &QueryRequest{
		FilterProducts: make([]granuleName, 0, len(identifierList)),
	}
	for _, id := range identifierList {
		request.FilterProducts = append(request.FilterProducts, granuleName{
			Name: id,
		})
	}
	return request
}